<template>
  <div class="app-container home">
    <el-card class="box-card">
      <el-row :gutter="20" align="middle">
        <el-col :span="1.5">
          <el-avatar :size="80" :src="userStore.avatar" />
        </el-col>
        <el-col :span="18">
          <div class="greetInfo">早上好，{{ userStore.nickname }}，今天又是充满活力的一天!</div>
          <div class="weatherInfo">今日多云转晴，20℃ - 25℃!</div>
        </el-col>
        <el-col :span="1.5">
          <el-statistic title="项目数" :value="25" />
        </el-col>
        <el-col :span="1.5">
          <el-statistic :value="4">
            <template #title>待办</template>
            <template #suffix>/16</template>
          </el-statistic>
        </el-col>
        <el-col :span="1.5">
          <el-statistic title="消息" :value="12" />
        </el-col>
      </el-row>
    </el-card>
    <el-card class="box-card">
      <el-row :gutter="20" align="middle">

      </el-row>
    </el-card>
  </div>
</template>

<script setup name="Index" lang="ts">
import { useUserStore } from '@/store/modules/user';

const userStore = useUserStore();

const goTarget = (url: string) => {
  window.open(url, '__blank');
};
</script>

<style lang="scss" scoped>
.home {
  .greetInfo {
    font-family: 'open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    overflow-x: hidden;
    height: 50%;
  }
  .weatherInfo {
    font-family: 'open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #676a6c;
    overflow-x: hidden;
    height: 50%;
    padding-top: 10px;
  }
  .el-statistic {
    --el-statistic-content-font-size: 24px;
    --el-statistic-title-font-size: 16px;
  }
}
</style>
